
class Font():
    def __init__(self):
        pass

    def get(self, name):
        if name not in self.__FONT:
            name = 'ERROR_CHAR'
        return self.__FONT[name]

class Font7(Font):
    HEIGHT = 7
    __FONT = {
        'A': ['0110','1001','1001','1111','1001','1001','0000',],
        'B': ['1110','1001','1110','1001','1001','1110','0000',],
        'C': ['0110','1001','1000','1000','1001','0110','0000',],
        'D': ['1110','1001','1001','1001','1001','1110','0000',],
        'E': ['1111','1000','1110','1000','1000','1111','0000',],
        'F': ['1111','1000','1110','1000','1000','1000','0000',],
        'G': ['0110','1001','1000','1011','1001','0110','0000',],
        'H': ['1001','1001','1111','1001','1001','1001','0000',],
        'I': ['111','010','010','010','010','111','000',],
        'J': ['0001','0001','0001','1001','1001','0110','0000',],
        'K': ['1001','1010','1010','1100','1010','1001','0000',],
        'L': ['1000','1000','1000','1000','1000','1111','0000',],
        'M': ['10001','11011','10101','10001','10001','10001','00000',],
        'N': ['1001','1001','1101','1011','1001','1001','0000',],
        'O': ['0110','1001','1001','1001','1001','0110','0000',],
        'P': ['1110','1001','1001','1110','1000','1000','0000',],
        'Q': ['01110','10001','10001','10001','10101','01110','00001',],
        'R': ['1110','1001','1001','1110','1010','1001','0000',],
        'S': ['0110','1001','0100','0010','1001','0110','0000',],
        'T': ['11111','00100','00100','00100','00100','00100','00000',],
        'U': ['1001','1001','1001','1001','1001','0110','0000',],
        'V': ['1001','1001','1001','1001','1010','0100','0000',],
        'W': ['10001','10001','10001','10101','10101','01010','00000',],
        'X': ['1001','1001','0110','1001','1001','1001','0000',],
        'Y': ['10001','10001','01010','00100','00100','00100','00000',],
        'Z': ['1111','0001','0010','0100','1000','1111','0000',],
        'a': ['0111','1001','1001','0111','0000',],
        'b': ['1000','1110','1001','1001','1110','0000',],
        'c': ['011','100','100','011','000',],
        'd': ['0001','0111','1001','1001','0111','0000',],
        'e': ['0110','1011','1100','0110','0000',],
        'f': ['001','010','111','010','010','000',],
        'g': ['0111','1001','1001','0111','0001','0110',],
        'h': ['1000','1110','1001','1001','1001','0000',],
        'i': ['1','0','1','1','1','0',],
        'j': ['01','00','01','01','01','10','00',],
        'k': ['1000','1001','1010','1110','1001','0000',],
        'l': ['1','1','1','1','1','0',],
        'm': ['11110','10101','10101','10101','00000',],
        'n': ['1110','1001','1001','1001','0000',],
        'o': ['0110','1001','1001','0110','0000',],
        'p': ['0110','1001','1001','1110','1000',],
        'q': ['0110','1001','1001','0111','0001',],
        'r': ['101','110','100','100','000',],
        's': ['0111','1100','0011','1110','0000',],
        't': ['010','111','010','010','001','000',],
        'u': ['1001','1001','1001','0111','0000',],
        'v': ['1001','1001','1010','0100','0000',],
        'w': ['10101','10101','01010','01010','00000',],
        'x': ['101','010','010','101','000',],
        'y': ['1001','1001','0111','0001','0110','0000',],
        'z': ['1111','0010','0100','1111','0000',],
        ' ': ['00','00','00','00','00',],
        '!': ['1','1','1','1','0','1','0',],
        '?': ['110','001','010','010','000','010','000',],
        ',': ['01','10',],
        '.': ['1','0',],
        ':': ['1','0','0','1','0','0',],
        ';': ['01','00','00','01','10','00',],
        "'": ['1','1','0','0','0','0','0',],
        '"': ['101','101','000','000','000','000','000',],
        '(': ['01','10','10','10','10','01','00',],
        ')': ['10','01','01','01','01','10','00',],
        '`': ['10','01','00','00','00','00','00',],
    
        '1': ['00100','01100','00100','00100','00100','00100','11111',],
        '2': ['01110','10001','00001','00110','01000','10000','11111',],
        '3': ['01110','10001','00001','00110','00001','10001','01110',],
        '4': ['00011','00101','01001','10001','11111','00001','00001',],
        '5': ['11111','10000','11110','00001','00001','10001','01110',],
        '6': ['00110','01000','10000','11110','10001','10001','01110',],
        '7': ['11111','10001','00001','00010','00100','00100','00100',],
        '8': ['01110','10001','10001','01110','10001','10001','01110',],
        '9': ['01110','10001','10001','01111','00001','00010','01100',],
        '0': ['01110','10001','10011','10101','11000','10001','01110',],

        'ERROR_CHAR': ['1111','1001','1001','1001','1001','1111','0000',],
    }

class Font5(Font):
    HEIGHT = 5
    __FONT = {
        "A": ['0111','1001','1001','1111','1001',],
        "B": ['1110','1001','1111','1001','1111',],
        "C": ['0111','1001','1000','1001','0111',],
        "D": ['1110','1001','1001','1001','1110',],
        "E": ['0111','1000','1110','1000','1111',],
        "F": ['1111','1000','1110','1000','1000',],
        "G": ['0110','1000','1011','1001','0111',],
        "H": ['1001','1001','1001','1111','1001',],
        "I": ['111','010','010','010','111',],
        "J": ['0001','0001','0001','1001','0110',],
        "K": ['1001','1001','1110','1001','1001',],
        "L": ['1000','1000','1000','1000','1111',],
        "M": ['10001','11011','10101','10101','10001',],
        "N": ['1001','1101','1011','1001','1001',],
        "O": ['0110','1001','1001','1001','0110',],
        "P": ['1110','1001','1001','1110','1000',],
        "Q": ['0110','1001','1001','1010','0101',],
        "R": ['0110','1001','1001','1110','1001',],
        "S": ['0111','1000','1111','0001','1111',],
        "T": ['11111','00100','00100','00100','00100',],
        "U": ['1001','1001','1001','1001','0110',],
        "V": ['1001','1001','1001','1010','0100',],
        "W": ['10001','10101','10101','10101','01111',],
        "X": ['1001','1001','0110','1001','1001',],
        "Y": ['1001','1001','1001','0111','0001','0110',],
        "Z": ['1111','0001','0110','1000','1111',],
        "0": ['1111','1001','1001','1001','1111',],
        "1": ['01','11','01','01','01',],
        "2": ['1110','0001','0111','1000','1111',],
        "3": ['1110','0001','0110','0001','1111',],
        "4": ['0011','0101','1001','1111','0001',],
        "5": ['1110','1000','1111','0001','1111',],
        "6": ['0110','1000','1111','1001','1111',],
        "7": ['1111','0001','0001','0010','0100',],
        "8": ['0111','1001','1111','1001','1111',],
        "9": ['1111','1001','1111','0001','0110',],
        ' ': ['00',],
        '!': ['1','1','1','0','1',],
        '?': ['110','001','111','000','010',],
        ',': ['01','10',],
        '.': ['1','0',],
        ':': ['1','0','1','0',],
        ';': ['01','00','01','10',],
        "'": ['1','1','0','0','0',],
        '"': ['101','101','000','000','000',],
        '(': ['01','10','10','10','01',],
        ')': ['10','01','01','01','10',],
        '`': ['10','01','00','00','00',],
        'ERROR_CHAR': ['1111','1001','1001','1001','1111',],
    }
    
    def get(self, name):
        name = name.upper()
        return super().get(name)




